<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8" />
    <title>主页</title>
    <!--CSS-->
    <link rel="stylesheet" type="text/css" media="all" href="/layui/css/layui.css"/>
    <link rel="stylesheet" type="text/css" media="all" href="/css/global.css"/>
    <script type="text/javascript" src="/layui/layui.all.js"></script>
    <script type="text/javascript" src="/js/jquery.min.js"></script>
    <script type="text/javascript" src="/js/myJs.js"></script>
    <link rel="stylesheet" type="text/css" media="all" href="/css/CaseManager.css"/>

</head>
<body>
<!--头部导航-->
<div class="layui-layout layui-layout-admin">
    <div class="layui-header layui-bg-green">
        <ul class="layui-nav" style="border-radius:0px">
            <li class="layui-nav-item">
                <a href="#">主页</a>
            </li>

        </ul>
    </div>
</div>
<div class="layui-col-xs-offset11">
    <div id="tuichu1"></div>
</div>
<!--主内容-->
<div class="layui-container" style="margin-top: 60px; height: 100%">
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend style="font-size: 18px; font-weight: 600">查看入口</legend>
    </fieldset>

    <div class="layui-row layui-col-space10">
        <div class="layui-col-md3">
            <div class="item">
                <div class="item-inner">
                    <div class="item-hd">
                        <a href="javascript:void(0)" onclick="wenzhang()" target="_blank" class="item-icon"><img src="/images/csr_create.png" /></a>
                        <h3><a href="javascript:void(0)" onclick="wenzhang()" target="_blank">文章</a></h3>
                    </div>
                    <div class="item-bd">
                        <div class="item-desc" title="文章">供下载的一些文章...</div>
                    </div>
                    <div class="item-ft">
                        <span class="item-link"></span>
                        <a class="item-btn" href="javascript:void(0)" onclick="wenzhang()" target="_blank"><button class="layui-btn layui-btn-normal layui-btn-xs">进入</button></a>
                    </div>
                </div>
            </div>
        </div>

        <div class="layui-col-md3">
            <div class="item">
                <div class="item-inner">
                    <div class="item-hd">
                        <a href="javascript:void(0)" onclick="shiping()" target="_blank" class="item-icon"><img src="/images/cert_self.png" /></a>
                        <h3><a href="javascript:void(0)" onclick="shiping()" target="_blank">宣传视频</a></h3>
                    </div>
                    <div class="item-bd">
                        <div class="item-desc" title="小视频">小视频...</div>
                    </div>
                    <div class="item-ft">
                        <span class="item-link"></span>
                        <a class="item-btn" href="javascript:void(0)" onclick="shiping()" target="_blank"><button class="layui-btn layui-btn-normal layui-btn-xs">进入</button></a>
                    </div>
                </div>
           </div>
        </div>

        <div class="layui-col-md3">
            <div class="item">
                <div class="item-inner">
                    <div class="item-hd">
                        <a href="javascript:void(0)" onclick="kejian()" class="item-icon"><img src="/images/csr_check.png" /></a>
                        <h3>培训课件</h3>
                    </div>
                    <div class="item-bd">
                        <div class="item-desc" title="培训课件">培训课件</div>
                    </div>
                    <div class="item-ft">
                        <span class="item-link"></span>
                        <a class="item-btn" href="javascript:void(0)" onclick="kejian()" target="_blank"><button class="layui-btn layui-btn-normal layui-btn-xs">进入</button></a>
                    </div>
                </div>
            </div>
        </div>

        <div class="layui-col-md3"><div class="item"><div class="item-inner"><div class="item-hd"><a href="javascript:void(0)" onclick="zhidu()" target="_blank" class="item-icon"><img src="/images/cer_check.png" /></a><h3><a href="javascript:void(0)" onclick="zhidu()" target="_blank">公司制度</a></h3></div><div class="item-bd"><div class="item-desc" title="公司制度">公司制度</div></div><div class="item-ft"><span class="item-link"></span><a class="item-btn" href="javascript:void(0)" onclick="zhidu()" target="_blank"><button class="layui-btn layui-btn-normal layui-btn-xs">进入</button></a></div></div></div></div>
        <div id="master"></div>
    </div>

</div>

<!--Footer-->
<div class="fly-footer" style="margin-right: auto; margin-left: auto; width: 200px;">
    <p><a href="#" target="_blank"> 资源分享平台</a> 2018</p>
</div>

</body>
<script>
    function zhuxiao(){
        var storage = window.localStorage;
        storage.clear();
    }
    function wenzhang(){
        loadPageWithBlank("/plateForm/Article");
    }
    function shiping(){
        loadPageWithBlank("/plateForm/Video");
    }
    function kejian(){
        loadPageWithBlank("/plateForm/Courseware");
    }
    function zhidu(){
        loadPageWithBlank("/plateForm/System");
    }
    function manage(){
        loadPage("/plateForm/StaffManage");

    }
    $(function () {
        var storage = window.localStorage;
        var result ='<br/><br/><div>'+storage.username+'    <a href="/plateForm/login" onclick="zhuxiao()" style="color: #1E9FFF;font-weight:bold">( 注销 ) </a>'+'</div>';
        $('#tuichu1').append(result);
        // if (storage.power == "master"||storage.power == "super"){
            var master= '<div class="layui-col-md3"><div class="item"><div class="item-inner"><div class="item-hd"><a href="#" onclick="manage();return false;" target="_blank" class="item-icon"><img src="/images/timg.png" /></a><h3><a href="#" onclick="manage();return false;" target="_blank">系统管理</a></h3></div><div class="item-bd"><div class="item-desc" title="系统管理">系统管理</div></div><div class="item-ft"><span class="item-link"></span><a class="item-btn" href="#" onclick="manage();return false;" target="_blank"><button class="layui-btn layui-btn-normal layui-btn-xs">进入</button></a></div></div></div></div>';
            $('#master').append(master);

        layui.use('form', function(){
            var form = layui.form;
            form.render();
        });
/*        var it =JSON.parse(localStorage.getItem("username"))
        if (it == null){
            loadPage("/plateForm/login")
        }*/
    })
</script>
</html>